$(function () {
    var newRem = function() {
        var html = document.documentElement;
        html.style.fontSize = html.getBoundingClientRect().width / 10 + 'px';
        console.log(html.style.fontSize);
    };
    window.addEventListener('resize', newRem, false);
    newRem();

    window.onload = function() {
        //tab切换
        var $tab = $(".tab-div .tab");
        var $content = $(".item .construction-team");
        $tab.click(function () {
            var $this = $(this);
            var $t = $this.index();
            $tab.removeClass("active");
            $this.addClass('active');
            $content.css("display","none");
            $content.eq($t).css("display","block");
        })
    }
})
function selectAll(ele) {
    var bool = $(ele).is(':checked');
    $('input[type="checkbox"]').prop("checked", bool);
     var resultNum = $("input[name='checkbox']:checked").length;
    console.log(resultNum)
    $('#chooseAllNum').html(resultNum);
};
function selectFirstAll(ele) {
    var bool = $(ele).is(':checked');
    $('input[type="checkbox"]').prop("checked", bool);
    var resultFirstNum = $("input[name='firstCheckbox']:checked").length;
    console.log(resultFirstNum)
    $('#selectAllNum').html(resultFirstNum);
};
